<jsp:useBean id="user" class="jsp.classes.Session" scope="session"/>
<%
    if (!user.isLoggedIn() && !(request.getMethod().equals("POST") && user.logIn(request.getParameter("username"), request.getParameter("password")))) {
        pageContext.forward("login");
        return;
    }
%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCtype html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Baalzebub</title>
        <link rel="stylesheet" type="text/css" href="styles/style.css" />
        <script type="text/javascript" src="scripts/jquery.js"></script>

    </head>
    <body>
        <div id="container">
            <div class="menu">
                <ul class="nav">
                    <li>
                        <a href="#home" id="home">Home</a>
                    </li>
                    <li>
                        <a href="#profile" id="profile">About me</a>
                    </li>
                    <li>
                        <a href="#projects" id="projects">Projects</a>
                    </li><%if (user.getEmployee().isAdmin()) {%>
                    <li>
                        <a href="#admin" id="admin">Admin</a>
                    </li><%}%>
                    <li>
                        <a href="logout">Logout</a>
                    </li>
                </ul>
                    <div onclick="hideChat()" id="hideChat" style="color: #ffffff;width:50px;position: relative;float: right;cursor:pointer">Hide</div>
            </div>
            <div id="projectPane"></div>
            <div class="chat" id="chat">
                <iframe src="chat" class="candy-chat"></iframe>
            </div>
        </div>


        <script type="text/javascript" src="scripts/scripts.js"></script>
        <script type="text/javascript">$(document).ready(ready);</script>
    </body>
</html>
